﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FileIndexer.Model;
using System.Collections.ObjectModel;

namespace FileIndexer.Repository
{
    public class MatchRepository
    {
        ObservableCollection<WordMatchModel> w = new ObservableCollection<WordMatchModel>();

        public void RegMatch(WordMatchModel cont, WordModel word)
        {

            using (var entitity = new FileIndexer.DAL.FileIndexerDB_r1Entities())
            {
                var res = (from o in entitity.IDX_WORD_MATCH
                           join t in entitity.IDX_TEXT
                           on o.IdDocument equals t.IdDocument
                           join w in entitity.CAT_WORD
                           on o.IdWord equals w.IdWord
                           where o.IdWordMatch == cont.IdWordMatch
                           select o).FirstOrDefault();

            }

        }
    }
}
